package cn.rwklyd.BookKeeping.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "transaction")
public class Transaction {
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "记录ID")
    private Long id;

    @TableField(value = "user_id")
    @Schema(description = "用户ID")
    private Long userId;

    @TableField(value = "category_id")
    @Schema(description = "分类ID")
    private Long categoryId;

    @TableField(value = "platform_id")
    @Schema(description = "平台ID")
    private Long platformId;

    @TableField(value = "amount")
    @Schema(description = "金额")
    private BigDecimal amount;

    @TableField(value = "transaction_date")
    @Schema(description = "交易时间")
    private LocalDateTime transactionDate;

    @TableField(value = "remark")
    @Schema(description = "备注")
    private String remark;

    @TableField(value = "receipt_image")
    @Schema(description = "消费凭证照片URL")
    private String receiptImage;

    @TableField(value = "is_ocr_generated")
    @Schema(description = "是否OCR自动识别生成：0-否，1-是")
    private Integer isOcrGenerated;

    @TableField(value = "create_time")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(value = "update_time")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @TableField(value = "is_deleted")
    @Schema(description = "是否删除：0-否，1-是")
    private Integer isDeleted;
} 